package futurecallableexecutor;

import java.util.Random;

/**
 * @author DELL
 * @create 2017-09-22 15:28
 */
public class Test2 {
    public static void main(String[] args) throws Exception {
        int[] data = new int[100000000];
        for(int i = 0; i < data.length; i++) {
            Random random = new Random();
            data[i] = random.nextInt(10000000);
        }

        long begin1 = System.currentTimeMillis();
        FindMaxTask findMaxTask = new FindMaxTask(data, 0, data.length);
        Integer max = findMaxTask.call();
        long end1 = System.currentTimeMillis();
        System.out.println("max:" + max + ", times:" + (end1 - begin1));
    }
}
